Skip to content

docs(auth): document organization-scoped ticket sessions - #523

Closed
swolfand wants to merge 1 commit into
mainfrom
sam/mobile-591-org-scoped-ticket-sign-in
Closed

docs(auth): document organization-scoped ticket sessions#523
swolfand wants to merge 1 commit into
mainfrom
sam/mobile-591-org-scoped-ticket-sign-in

Conversation

@swolfand

@swolfand swolfand commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • document that organization-scoped Backend API tickets activate the Organization for the resulting session
  • verify signInWithTicket(_:) uses the ticket strategy
  • cover synchronization of Session.lastActiveOrganizationId from a completed sign-in response

Context

When the Backend API creates a sign-in token with org_id, consuming that token activates the Organization for the new session. Clerk iOS already synchronizes the Client envelope returned by the Frontend API; this change documents that behavior and adds focused regression coverage.

Related work:

Testing

  • make format-check
  • swift test --filter AuthTests
  • swift test --filter ClerkClientSyncResponseMiddlewareTests

Linear: MOBILE-591

Note

Document organization-scoped ticket sessions in Auth.signInWithTicket

  • Expands the doc comment on Auth.signInWithTicket to clarify that organization-scoped tickets activate that organization, accessible via Clerk/session and Session/lastActiveOrganizationId.
  • Updates the middleware test to validate client sync behavior using a completed SignIn response (via /v1/client/sign_ins) instead of a session touch response.
  • Adds an assertion in AuthTests to verify the sign-in strategy is set to .ticket when signInWithTicket is called.

🖇️ Linked Issues

Partially addresses MOBILE-591, which tracks adding org_id support to the sign-in token API for hybrid iOS/Android flows.

Macroscope summarized 57249de.

@github-actions

Copy link
Copy Markdown
Contributor

CI paused

CI does not run automatically on pull request updates.

Before merging, manual CI must be run and pass for the latest commit.

When this PR is ready for CI, the PR author or a repository maintainer can comment:

/run ci

Or use the quick action below:

  • Run CI

Copy link
Copy Markdown
Collaborator Author

Closing after re-evaluating the integration boundary. org_id is carried in the backend-issued ticket, so the native SDK request remains strategy=ticket plus the unchanged ticket value. Existing client synchronization already handles last_active_organization_id.

The backend end-to-end coverage in clerk/clerk_go#20464 verifies Organization activation, and the native usage is documented in clerk/clerk#2977. No native runtime change is required.

@swolfand swolfand closed this Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant